import useUserStore from "@/stores/modules/user";

export default function usePermission() {
  const userState = useUserStore();

  // 可以根据实际情况调整权限检查逻辑，这里简化处理
  const hasPermission = (requiredPermission: string) => {
    return userState.rulesName.includes(requiredPermission);
  };

  return {
    hasPermission
  };
}
